# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=cpdb-libs
pkgver=2.0b1
pkgrel=1
pkgdesc="Frontend and Backend Libraries for the common printing dialog"
arch=('x86_64')
url="https://github.com/OpenPrinting/cpdb-libs"
license=('MIT')
depends=('glib2')
makedepends=('python')
source=($url/releases/download/$pkgver/cpdb-libs-$pkgver.tar.gz)
sha256sums=('cae9f9c0c153ed4ef9b69409233eca078a2579fcf595ef77bd776b1dc9d19c8d')
#validpgpkeys=()

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd "$pkgname-$pkgver"
  make -k check
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
